package com.huangliusong.mybatis.dao;

import com.huangliusong.mybatis.bean.Person;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * @author huangliusong
 * @since 2018/11/2
 * {@link }
 */
public interface PersonMapper {

    public void deletePerson(Integer id);
//
//  public Person getPersonByNameAndGender(String username,String gender);

  //public Person getPersonByNameAndGender(Person person);
    public Person getPersonByNameAndGender(@Param("username") String username, @Param("gender") String gender);

 // public Person getPersonByCollection(Collection list);

    public Person getPersonByCollection(@Param("key") Collection list);


    public List<Person> getPersonByIds(int[] id);

    public int addPersons(@Param("persons") List<Person> persons);

    public int addPersons2(@Param("persons") List<Person> persons);

    public int addPerson(@Param("person")Person person);
}
